/* 全局CSS变量 */
:root {
  /* 主题色 */
  --primary-color: #2962FF;
  --primary-light: #768fff;
  --primary-dark: #0039cb;
  
  /* 背景色 */
  --bg-color: #ffffff;
  --navbar-bg: #ffffff;
  --footer-bg: #F5F7FA;
  --card-bg: #ffffff;
  --hover-bg: rgba(41, 98, 255, 0.1);
  
  /* 文本色 */
  --text-color: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  
  /* 边框色 */
  --border-color: #e0e0e0;
  
  /* 状态色 */
  --success-color: #4CAF50;
  --warning-color: #FFC107;
  --error-color: #F44336;
  --info-color: #2196F3;
}

/* 暗黑模式变量 */
.dark-mode {
  --primary-color: #768fff;
  --primary-light: #a2abff;
  --primary-dark: #0039cb;
  
  --bg-color: #121212;
  --navbar-bg: #1e1e1e;
  --footer-bg: #1e1e1e;
  --card-bg: #2d2d2d;
  --hover-bg: rgba(118, 143, 255, 0.2);
  
  --text-color: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-light: #808080;
  
  --border-color: #444444;
}

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

code, pre {
  font-family: 'Roboto Mono', monospace;
  background-color: var(--footer-bg);
  border-radius: 4px;
}

code {
  padding: 0.2rem 0.4rem;
  font-size: 0.9em;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

button, .btn {
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  border: none;
  transition: background-color 0.2s, transform 0.1s;
}

button:active, .btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--hover-bg);
}

/* 卡片组件样式 */
.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 网格布局 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* 表单元素 */
input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* 工具类 */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-8 {
  gap: 2rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

/* 响应式工具类 */
@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Material Icons 支持 */
.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}